package com.cm.figure.model;


import java.util.Objects;

public class Pictures {
    private Long id;

    private String filename;

    private String uploadtime;

    private Integer typeid;

    private Long filesize;

    private Long userid;

    private String filepath;

    private String url;

    User user;

    Integer total = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public String getUploadtime() {
        return uploadtime;
    }

    public void setUploadtime(String uploadtime) {
        this.uploadtime = uploadtime;
    }

    public Integer getTypeid() {
        return typeid;
    }

    public void setTypeid(Integer typeid) {
        this.typeid = typeid;
    }

    public Long getFilesize() {
        return filesize;
    }

    public void setFilesize(Long filesize) {
        this.filesize = filesize;
    }

    public String getFilepath() {
        return filepath;
    }

    public void setFilepath(String filepath) {
        this.filepath = filepath;
    }

    public Long getUserid() {
        return userid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Pictures() {
    }

    public Pictures(Long id, String filename, String uploadtime, Integer typeid, Long filesize, Long userid, String filepath, String url, User user, Integer total) {
        this.id = id;
        this.filename = filename;
        this.uploadtime = uploadtime;
        this.typeid = typeid;
        this.filesize = filesize;
        this.userid = userid;
        this.filepath = filepath;
        this.url = url;
        this.user = user;
        this.total = total;
    }

    @Override
    public String toString() {
        return "Pictures{" +
                "id=" + id +
                ", filename='" + filename + '\'' +
                ", uploadtime='" + uploadtime + '\'' +
                ", typeid=" + typeid +
                ", filesize=" + filesize +
                ", userid=" + userid +
                ", filepath='" + filepath + '\'' +
                ", url='" + url + '\'' +
                ", user=" + user +
                ", total=" + total +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pictures pictures = (Pictures) o;
        return Objects.equals(filename, pictures.filename);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, filename, uploadtime, typeid, filesize, userid, filepath, url, user, total);
    }
}